#ifndef MESSAGELOG_H
#define MESSAGELOG_H

#include <QDialog>
#include <QWidget>
#include <QTextEdit>
#include <QThread>
#include <QAction>
#include <QPlainTextEdit>
#include <QPushButton>

class MessageLog : public QWidget
{
    Q_OBJECT
public:
    explicit MessageLog(QWidget *parent = nullptr);
    ~MessageLog();
    void set_text(const QString &text);
    // void append_text(const QString &text);
    void clear_text(void);

private:
    QPlainTextEdit *log_text;
    QPushButton *btn_clear;
private slots:
    void btn_click_clear(void);
signals:
    void append_text(const QString &text);
public slots:
    void append_log_text(QtMsgType type, const QString &);

};

#endif // MESSAGELOG_H

